package com.xixi.easy.rpc.proxy;

import java.lang.reflect.Proxy;

/**
 * @author: zxh
 * @date: 2024/8/21 14:14
 * @description: 动态代理对象工厂
 */
public class ServiceProxyFactory {

	public static <T> T getProxy(Class<T> serviceClass) {
		return (T) Proxy.newProxyInstance(
				serviceClass.getClassLoader(),
				new Class[]{serviceClass},
				new ServiceProxy());
	}
}
